(self.webpackChunk_klaviyo_onsite_modules=self.webpackChunk_klaviyo_onsite_modules||[]).push([[4430],{56388:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});const o={profile:["hub","profile"],recentOrders:["hub","orders","recent"],getRecentOrdersForIdentifiedProfile:(e,t)=>["hub","orders","recent","identified",e,t],recommendedProducts:e=>["hub","products","recommended",e],getRecommendedProductsForIdentifiedProfile:(e,t,n)=>["hub","products","recommended","identified",e,t,n],getOrderKey:e=>["hub","order",e],getOrderByIdForIdentifiedProfile:(e,t,n)=>["hub","order","identified",e,t,n],getContentBlocksUnauthenticated:e=>["hub","contentBlocks",e],getContentBlocks:(e,t)=>["hub","contentBlocks",e,t],getContentBlocksForIdentifiedProfile:(e,t)=>["hub","contentBlocks","identified",e,t],getProfileForIdentifiedProfile:(e,t)=>["hub","profile","identified",e,t],getShouldShowAddToCartPopover:(e,t)=>["hub","addToCartPopover",e,t],getShouldShowAddToCartPopoverUnauthenticated:()=>["hub","addToCartPopover"],getShouldShowAddToCartPopoverForIdentifiedProfile:(e,t)=>["hub","addToCartPopover","identified",e,t],getRecentProductsKey:["hub","products","recent"],getRecentProductsForIdentifiedProfile:(e,t)=>["hub","products","recent","identified",e,t],getWishlistKey:["hub","wishlist"],getWishlistForIdentifiedProfile:(e,t)=>["hub","wishlist","identified",e,t],getHelp:["hub","orderHelp","getHelp"],updateProfile:["hub","profile","update"],updateProfileConsent:["hub","profile","update","consent"],activeTicket:["hub","tickets","active"],activeTicketId:["hub","tickets","active","id"],activeMessages:["hub","messages","active"],createTicket:["hub","tickets","create"],closeTicket:["hub","tickets","close"],faqs:e=>["hub","faqs",e],markTicketRead:["hub","tickets","read"],indicateUserTyping:["hub","tickets","typing"],sendMessage:["hub","send","message"],sendEmailIdentificationMessage:["hub","send","email"],sendYesNoResponseMessage:["hub","send","yesNo"],couponsLoggedIn:(e=!1)=>["hub","coupons",e],getCouponsForIdentifiedProfile:(e,t)=>["hub","coupons","identified",e,t],couponsCount:["hub","coupons","count"],initiateLogin:["initiateLogin"],verifyLogin:["verifyLogin"],subscribeToList:["marketing","subscribe"],hydrateProductKey:e=>["hub","products","hydrate",e],storefrontLogin:["auth","storefrontLogin"],storefrontLocales:["storefront","locales"],storefrontCurrentLocale:["storefront","locale"],loyaltyTiers:["hub","loyalty","tiers"],loyaltyCustomer:["hub","loyalty","customer"],loyaltyPurchaseReward:["hub","loyalty","purchaseReward"],loyaltyCoupons:["hub","loyalty","coupons"],reviewsSettings:["reviews","settings"],cart:["hub","cart"],applyCoupon:["hub","coupon","apply"],getOrderStatusKey:e=>["hub","order","status",e],getOrderStatusForIdentifiedProfileKey:(e,t,n)=>["hub","order","status","identified",e,t,n],getCompanyAppStatusKey:(e,t)=>["hub","company-app","status",e,t],getCompanyAppTypeStatusKey:(e,t)=>["hub","company-app","type","status",e,t],initiateReturn:e=>["hub","order",e,"initiate-return"],csatSettings:(e,t)=>["hub","csat","settings",e,t],submitCSAT:["hub","csat","submit"],conversationStarters:["hub","conversation","starters"],subscriptionDetails:e=>["hub","subscriptions",e],subscriptionDetailsForIdentifiedProfile:(e,t)=>["hub","subscriptions","identified",e,t],subscriptionSkip:["hub","subscriptions","skip"],subscriptionPause:e=>["hub","subscriptions",e,"pause"],subscriptionUnpause:e=>["hub","subscriptions",e,"unpause"],subscriptionSendNow:e=>["hub","subscriptions",e,"send-now"],subscriptionDelay:e=>["hub","subscriptions",e,"Delay"]}},69428:function(e,t,n){"use strict";n.d(t,{$7:function(){return p},AF:function(){return D},AL:function(){return i},BB:function(){return o},BY:function(){return h},FH:function(){return E},Fo:function(){return y},HW:function(){return w},JJ:function(){return R},Ny:function(){return d},OU:function(){return A},Ox:function(){return l},QE:function(){return L},RF:function(){return S},RZ:function(){return s},S0:function(){return u},WJ:function(){return b},Wg:function(){return I},XS:function(){return T},Xj:function(){return N},Xl:function(){return f},ZW:function(){return P},bY:function(){return C},cy:function(){return _},dJ:function(){return k},eb:function(){return v},l1:function(){return U},me:function(){return a},nm:function(){return c},pv:function(){return m},uw:function(){return O},xP:function(){return r},yS:function(){return g}});const o=!0,r="__kl_sms_req",i="klaviyo",s={SHOPIFY:"Shopify",OTHER:"Other"},a={MOBILE:"Mobile",DESKTOP:"Desktop"},u={CUSTOMER_HUB_ACCOUNT:"Customer Hub Account",CUSTOMER_HUB_LAST_LOGIN:"Customer Hub Last Login"},c={RECENTLY_VIEWED:"Recently viewed",FAVORITES:"Favorites",RECOMMENDED:"Recommended",BUY_AGAIN:"Buy Again",PRODUCT_DETAILS_PAGE:"Product details page",PRODUCT_LISTING_PAGES:"Product listing pages",FOR_YOU:"For You page",ORDER:"Order",ORDERS:"Orders",HUB_LAUNCHER:"Hub Launcher",FAQ:"FAQ",FAQ_WIDGET:"FAQ Widget",CHAT:"Chat",AI_AGENT:"AI_AGENT",ADD_TO_CART_POPOVER:"Add to Cart Popover"},l={UNIQUE_ID:"unique_id",ORDER:"Order",ORDER_ID:"Order ID",LINE_ITEMS:"Line Items",ORDER_NAME:"Order Name",STATUS:"Status",TOTAL_DISCOUNTS:"Total Discounts",PRODUCT:"Product",PRODUCT_ID:"Product ID",PRODUCT_NAME:"Product Name",PRODUCT_URL:"Product URL",VARIANT:"Variant",VARIANT_ID:"Variant ID",VARIANT_NAME:"Variant Name",IMAGE_URL:"Image URL",CONTENT_BLOCK:"Content Block",ADD_TO_CART_SOURCE:"Add to Cart Source",VIEW_SOURCE:"View Source",COUPON_CODE:"Coupon Code",COUPON_NAME:"Coupon Name",COUPON_ID:"Coupon ID",COUPON_DESCRIPTION:"Coupon Description",COUPON:"Coupon",NEW_USER:"New User",FAVORITE_SOURCE:"Add to Favorites Source",WEB_CHAT_USER_TYPE:"Web Chat User Type",CLIENT_ID:"Client ID",SENDER_TYPE:"Sender Type",MESSAGE_ID:"Message ID",CONVERSATION_ID:"Conversation ID",WEB_CHAT_SOURCE:"Web Chat Source",CSAT_RATING:"CSAT Rating",POINTS_BALANCE:"Points Balance",NEXT_TIER:"Next Tier",NEXT_TIER_NAME:"Next Tier Name",NEXT_TIER_ID:"Next Tier ID",BEST_TIER:"Best Tier",BEST_TIER_NAME:"Best Tier Name",BEST_TIER_ID:"Best Tier ID",SUBSCRIPTION:"Subscription",SUBSCRIPTION_ID:"Subscription ID",FAQ_SOURCE:"FAQ Source",FAQ_ID:"FAQ ID",FAQ_NAME:"FAQ Name",LOGIN_STATUS:"Login Status"},d={WEB_CHAT_USER_TYPE:"web_chat_user_type",CLIENT_ID:"client_id",SENDER_TYPE:"sender_type",MESSAGE_ID:"message_id",CONVERSATION_ID:"conversation_id",WEB_CHAT_SOURCE:"web_chat_source",ROUTE:"route",LOYALTY_PROVIDER:"loyalty_provider",LINK_URL:"link_url",LINK_TEXT:"link_text"},C={CUSTOMER_HUB:"Customer Hub"},f={OPENED_CUSTOMER_HUB:"Opened Customer Hub",VIEWED_ORDER:"Customer Hub Viewed Order",CLICKED_BUY_AGAIN:"Customer Hub Clicked Buy Again",CLICKED_ADD_TO_CART:"Customer Hub Clicked Add to Cart",CLICKED_TRACK_SHIPMENT:"Customer Hub Clicked Track Shipment",CLICKED_START_RETURN:"Customer Hub Clicked Start Return",CLICKED_CONTENT_BLOCK:"Customer Hub Clicked Content Block",CLICKED_COUPON_BLOCK:"Customer Hub Clicked Coupons",CUSTOMER_HUB_LOGIN:"Customer Hub Login",CLICKED_BEGIN_GET_HELP_FLOW:"Customer Hub Clicked Get Help Flow",CLICKED_EXTERNAL_HELP_URL:"Customer Hub Clicked External Help url",CLICKED_GORGIAS_CHAT_GET_HELP:"Customer Hub Clicked Gorgias Chat Get Help",CLICKED_ORDER_LINE_ITEM:"Customer Hub Clicked Order Line Item",CLICKED_VIEW_ORDER:"Customer Hub Clicked View Order",CLICKED_VIEW_SUBSCRIPTION:"Customer Hub Clicked View Subscription",ADD_FAVORITE_PRODUCT:"Customer Hub Add to Favorites",REMOVE_FAVORITE_PRODUCT:"Customer Hub Remove from Favorites",COUPON_APPLIED:"Customer Hub Coupon Applied",WEB_CHAT_CONVERSATION_STARTED:"Started Web Chat Conversation",WEB_CHAT_MESSAGE_SENT:"Sent Web Chat Message",WEB_CHAT_MESSAGE_RECEIVED:"Received Web Chat Message",WEB_CHAT_CONVERSATION_ESCALATED:"Web Chat Conversation Escalated",CSAT_SUBMITTED:"CSAT Submitted",LOYALTY_CLICKED_PROGRESS_BAR:"Customer Hub Clicked Loyalty Progress Bar",CLICKED_PRODUCT:"Customer Hub Clicked Product",CLICKED_FAQ:"Customer Hub Clicked FAQ"},E={VIEWED_CONTENT_BLOCK:"Customer Hub Viewed Content Block",VIEWED_ADD_TO_CART_POPOVER:"Customer Hub Viewed Add To Cart Popover"},g={CLICKED_FOR_YOU:"Customer Hub Clicked Hub Launcher For You",CLICKED_WISHLIST:"Customer Hub Clicked Hub Launcher Wishlist",CLICKED_CHAT:"Customer Hub Clicked Hub Launcher Chat",DISMISSED_FLOATING_MESSAGE:"Customer Hub Dismissed Hub Launcher Floating Message",CLICKED_FLOATING_MESSAGE:"Customer Hub Clicked Hub Launcher Floating Message"},p={LOYALTY_PROVIDER_LOADED:"customerHubLoyaltyProviderLoaded",WEB_CHAT_CONVERSATION_STARTED:"conversationStarted",AI_AGENT_LINK_CLICKED:"aiAgentLinkClicked"},m={OPEN:"open",CLOSE:"close"},h=".klaviyo-wishlist-slot",S=".kl-hub-favorites-slot",b=".klaviyo-favorites-plp-slot",_=".klaviyo-faqs-slot",T=`${h}, ${_}, ${b}, ${S}`,I={ANONYMOUS:"Anonymous",IDENTIFIED:"Identified",AUTHENTICATED:"Authenticated"},O={LOGGED_IN:"Logged In",RECOGNIZED:"Recognized",LOGGED_OUT:"Logged Out"},v="robot",L="outgoing",y="incoming",w="kservice-webchat",A="window.customerHubApi",R="kservice-customer-hub",P="en-US",D={"en-US":{localeLabel:"English",regions:[{regionCode:"US",regionBCP47Code:"en-US"}]},"en-AU":{localeLabel:"English (Australia)",regions:[{regionCode:"AU",regionBCP47Code:"en-AU"}]},"fr-FR":{localeLabel:"Français",regions:[{regionCode:"FR",regionBCP47Code:"fr-FR"}]},"de-DE":{localeLabel:"Deutsch",regions:[{regionCode:"DE",regionBCP47Code:"de-DE"}]},"es-ES":{localeLabel:"Español (España)",regions:[{regionCode:"ES",regionBCP47Code:"es-ES"}]},"it-IT":{localeLabel:"Italiano",regions:[{regionCode:"IT",regionBCP47Code:"it-IT"}]},"pt-BR":{localeLabel:"Português",regions:[{regionCode:"BR",regionBCP47Code:"pt-BR"}]},"ko-KR":{localeLabel:"한국어",regions:[{regionCode:"KR",regionBCP47Code:"ko-KR"}]},"da-DK":{localeLabel:"Dansk",regions:[{regionCode:"DK",regionBCP47Code:"da-DK"}]},"en-GB":{localeLabel:"English (Great Britain)",regions:[{regionCode:"GB",regionBCP47Code:"en-GB"}]},"fi-FI":{localeLabel:"Suomi",regions:[{regionCode:"FI",regionBCP47Code:"fi-FI"}]},"hu-HU":{localeLabel:"Magyar",regions:[{regionCode:"HU",regionBCP47Code:"hu-HU"}]},"nl-NL":{localeLabel:"Nederlands",regions:[{regionCode:"NL",regionBCP47Code:"nl-NL"}]},"nb-NO":{localeLabel:"Norsk",regions:[{regionCode:"NO",regionBCP47Code:"nb-NO"}]},"sv-SE":{localeLabel:"Svenska",regions:[{regionCode:"SE",regionBCP47Code:"sv-SE"}]},"pt-PT":{localeLabel:"Português",regions:[{regionCode:"PT",regionBCP47Code:"pt-PT"}]},"es-MX":{localeLabel:"Español (México)",regions:[{regionCode:"MX",regionBCP47Code:"es-MX"}]},"pl-PL":{localeLabel:"Polski",regions:[{regionCode:"PL",regionBCP47Code:"pl-PL"}]},"ja-JP":{localeLabel:"日本語",regions:[{regionCode:"JP",regionBCP47Code:"ja-JP"}]}},N=["da-DK","de-DE","en-GB","en-AU","en-US","es-ES","es-MX","fi-FI","fr-FR","hu-HU","it-IT","ja-JP","ko-KR","nl-NL","nb-NO","pl-PL","pt-BR","pt-PT","sv-SE"];let U=function(e){return e[e.TEXT=0]="TEXT",e[e.RATING=1]="RATING",e[e.RATING_AND_TEXT=2]="RATING_AND_TEXT",e}({}),k=function(e){return e[e.EMOJIS=0]="EMOJIS",e[e.FLAT_ICONS=1]="FLAT_ICONS",e[e.STARS=2]="STARS",e}({})},555:function(e,t,n){"use strict";n.d(t,{Cq:function(){return a},Dn:function(){return c},FV:function(){return _},Ho:function(){return m},Nc:function(){return C},Q7:function(){return l},au:function(){return s},e5:function(){return g},ir:function(){return p},lk:function(){return b},oF:function(){return u},pZ:function(){return i},qO:function(){return d},tE:function(){return S},vb:function(){return h}});n(26650),n(92461),n(60873);const o="atlas_anonymous_token",r="onsite_client_id";function i(){return localStorage.getItem(o)}function s(e){e?localStorage.setItem(o,e):localStorage.removeItem(o)}function a(){return localStorage.getItem(r)}function u(e){e?localStorage.setItem(r,e):localStorage.removeItem(r)}function c(){return localStorage.getItem("atlas_token")}function l(e){e?localStorage.setItem("atlas_token",e):localStorage.removeItem("atlas_token")}function d(){localStorage.setItem("welcomeMessageDismissed","true")}function C(){localStorage.removeItem("welcomeMessageDismissed")}const f="active_ticket_id",E="active_ticket_expired";function g(){localStorage.removeItem(f),localStorage.removeItem(E)}function p(){if(localStorage.getItem(E))return;const e=new Date(Date.now()+3e5).toISOString();localStorage.setItem(E,e)}function m(){return function(){const e=localStorage.getItem(E);return!!e&&(new Date).getTime()>new Date(e).getTime()}()&&g(),localStorage.getItem(f)}function h(e){e&&localStorage.setItem(f,e)}function S(e){if(e)try{const t=function(e){const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map((function(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`})).join(""));return JSON.parse(n)}(e);return t}catch(e){return}}function b(){var e,t;return null!=(e=null==(t=window.klaviyoModulesObject)?void 0:t.companyId)?e:""}function _(){return window.customerHub}},37912:function(e,t,n){"use strict";n.d(t,{A:function(){return s},B:function(){return a}});var o=n(18359),r=n.n(o);const i=(0,o.createContext)(void 0);function s(){const e=(0,o.useContext)(i);if(!e)throw new Error("useECommerceClient: No ECommerceProvider found.");return e}const a=({client:e,children:t})=>r().createElement(i.Provider,{value:e},t)},69313:function(e,t,n){"use strict";n.d(t,{_C:function(){return w},ZI:function(){return L},xh:function(){return y},nB:function(){return v},OZ:function(){return O},ql:function(){return I}});var o=n(18359),r=n.n(o),i=n(95094),s=n(17804);n(92461),n(84618),n(39265),n(44159),n(60873);var a=n(64928),u=n(47803),c=n(77407);const l=async(e,t,n)=>{try{const o=((e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{n[`${t}.${e}`]=o})),n})(await e(t,n),n);return{success:!0,messages:o}}catch(e){return{success:!1,messages:{}}}},d=(e,t)=>async n=>{const o=t.map((t=>l(e,n,t))),r=await Promise.all(o);if(r.every((e=>!e.success)))throw new Error(`All namespaces failed to load for locale: ${n}`);return(e=>{const t={};return e.forEach((e=>{Object.assign(t,e.messages)})),t})(r)},C=e=>{const t=[e],n=(e=>{var t;const n=e.split("-")[0];return null==(t=Object.entries(c.XJ).find((([e])=>e===n)))?void 0:t[1]})(e);return n&&n!==e&&t.push(n),t.includes(c.ZW)||t.push(c.ZW),t},f=(e,t,n,o)=>{e.load(t,n),e.activate(t),o(t)},E=async e=>{const{lng:t,ns:n,resourceLoader:o}=e,r=d(o,n),{messages:i,actualLocale:s}=await(async(e,t)=>{try{return{messages:await e(t),actualLocale:t}}catch(n){if(t!==c.ZW)try{return{messages:await e(c.ZW),actualLocale:c.ZW}}catch(e){return{messages:{},actualLocale:t}}return{messages:{},actualLocale:t}}})(r,t),l=(e=>{const t=(0,a.E5)({locale:e,locales:C(e)});return t.setMessagesCompiler(u.S),t})(s);let E=s;Object.keys(i).length>0&&(l.load(s,i),l.activate(s)),Object.defineProperty(l,"locale",{get:()=>E,configurable:!0});const g=((e,t,n)=>async o=>{try{const r=await e(o);f(t,o,r,n)}catch(r){if(o!==c.ZW)try{const o=await e(c.ZW);f(t,c.ZW,o,n)}catch(e){}}})(r,l,(e=>{E=e}));return{i18nInstance:l,switchToLocale:g}};const g=e=>{const{children:t,i18nInstance:n,switchToLocale:a,locale:u}=e,[c,l]=(0,o.useState)(u);(0,o.useEffect)((()=>{n&&l(n.locale)}),[n]),(0,o.useEffect)((()=>{l(u)}),[u]);const d=(0,o.useMemo)((()=>({currentLocale:c,setCurrentLocale:async e=>{await a(e),l(n.locale)},i18nInstance:n})),[c,n,a]);return n?r().createElement(s.bd,{i18n:n},r().createElement(i.W.Provider,{value:d},t)):null};var p=n(52901),m=n(69428);const h=async(e,t)=>{if(e===m.ZW){return(await n(28367)(`./${t}/${e}/translations.json`)).default}try{const n=await fetch(`https://static-app.klaviyo.com/translations/${e}/${t}/latest.json`,{credentials:"omit",cache:"default"});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return await n.json()}catch(o){if("en-US"!==e)try{return(await n(59229)(`./${t}/en-US/translations.json`)).default}catch(e){throw o}throw o}};var S=n(37912),b=n(56388),_=n(54539);const T="atlas_preferred_locale";function I(){if(!(0,o.useContext)(i.W))throw new Error("useLocalization: no LocalizationProvider found.");const e=function(e){const{i18n:t,_:n}=(0,s.mV)();return{t:(t,o)=>{const r=`${String(e)}.${t}`;return n(r,o)},i18n:t,ready:!0}}("onsite-atlas");return e}function O(){const{currentLocale:e}=(0,i.Q)();return function(t,n){if(null==t)return;return function(e,t,n){return new Intl.DateTimeFormat(t,n).format(e)}("string"==typeof t?new Date(t):t,e,n)}}function v(){const{currentLocale:e}=(0,i.Q)();return function(t,n){if(null!=t)return function(e,t,n){return new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e)}(t,n,e)}}const L=async e=>E({lng:e,ns:["onsite-atlas"],resourceLoader:h}),y=()=>{let e=()=>[];return e=(0,S.A)().getAvailableLocales,(0,p.ZP)(b.g.storefrontLocales,e)},w=({children:e,i18nInstance:t,localizedValues:n,locale:i=m.ZW})=>{const[s,a]=(0,o.useState)(t),u=(0,S.A)().setLocale,c=r().useCallback((async e=>{var t;null==s||s.switchToLocale(e),(t=e)?localStorage.setItem(T,t):localStorage.removeItem(T),u(e)}),[s,u]);return(0,o.useEffect)((()=>{s?null!=s&&s.i18nInstance&&s.i18nInstance.locale!==i&&s.switchToLocale(i):L(i).then((e=>{a(e)}))}),[s,i]),null!=s&&s.i18nInstance?r().createElement(o.Suspense,{fallback:null},r().createElement(g,{i18nInstance:null==s?void 0:s.i18nInstance,switchToLocale:c,locale:i},r().createElement(_.a,{localizedValues:n},e))):null}},54539:function(e,t,n){"use strict";n.d(t,{A:function(){return s},a:function(){return a}});var o=n(18359),r=n.n(o);const i=(0,o.createContext)(void 0);function s(){return(0,o.useContext)(i)}const a=({localizedValues:e,children:t})=>r().createElement(i.Provider,{value:e},t)},16340:function(e,t,n){"use strict";n.d(t,{ZD:function(){return u},oG:function(){return l},w8:function(){return c}});var o=n(2609),r=n(98072),i=n(49917),s=n(69428),a=n(555);const u=(e,t)=>{const n=(()=>{if((0,a.Dn)())return s.uw.LOGGED_IN;const{$exchange_id:e}=(0,o.zy)();return e?s.uw.RECOGNIZED:s.uw.LOGGED_OUT})(),i={page:window.location.href,integration:window.Shopify?s.RZ.SHOPIFY:s.RZ.OTHER,device:(0,r.Z)()?s.me.MOBILE:s.me.DESKTOP,[s.Ox.LOGIN_STATUS]:n};(0,o.eR)({metric:e,properties:Object.assign({},i,t),service:s.AL})},c=(e,t,n)=>{var o;if(null!=(o=window.klaviyoModulesObject)&&o.companyId){const o={logToStatsd:!0,logToS3:!0,logToMetricsService:!0,metric:t,metricServiceEventName:t},a={device_type:(0,r.Z)()?s.me.MOBILE:s.me.DESKTOP,page_url:window.location.href};(0,i.Z)({metricGroup:e,events:[Object.assign({},o,{eventDetails:Object.assign({},a,n)})],companyId:window.klaviyoModulesObject.companyId})}},l=(e,t,n,r)=>(0,o.ro)({fields:{email:e,[s.S0.CUSTOMER_HUB_ACCOUNT]:!0,[s.S0.CUSTOMER_HUB_LAST_LOGIN]:(new Date).toISOString()},callback:()=>(u(s.Xl.CUSTOMER_HUB_LOGIN,{[s.Ox.NEW_USER]:t}),n&&n(),r&&r(),!0)})},71381:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});class o extends EventTarget{dispatchEvent(e){return super.dispatchEvent(e)}dispatch(e){const t=new CustomEvent(e.type,{detail:e});return this.dispatchEvent(t)}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e){super.removeEventListener(e,null)}}},20007:function(e,t,n){"use strict";n.d(t,{Vq:function(){return s},jO:function(){return i}});n(70917),n(93677),n(84304),n(75723),n(20696),n(38528),n(72418);const o="/chat",r=new Set([o,"/checkOTP"]);function i(e){var t,n;const o=null==(t=e.general)?void 0:t.customerHubOnboarded,r=null==(n=e.general)?void 0:n.webChatOnboarded;return{hasFullExperience:!1!==o,isChatOnlyExperience:!1===o&&!0===r}}function s(e,t){return t.isChatOnlyExperience?r.has(e)?e:o:e}},43451:function(e,t,n){"use strict";n.d(t,{a:function(){return o},r:function(){return r}});const o=new(n(71381).d),r={sendFavoriteAdded:e=>{o.dispatch({type:"favorite",data:{newFavorite:e}})},sendFavoriteRemoved:e=>{o.dispatch({type:"unfavorite",data:{removedFavorite:e}})},sendNewMessage:e=>{o.dispatch({type:"new-message",data:{message:e}})},sendMessageRead:e=>{o.dispatch({type:"message-read",data:{messageId:e}})},onFavoriteAdded:(e,t)=>{o.addEventListener("favorite",(t=>{e(t.detail)}),t)},onAddToCartScrollDown:(e,t)=>{o.addEventListener("addToCartScrollDown",(t=>{e(t.detail)}),t)},onAddToCartScrollUp:(e,t)=>{o.addEventListener("addToCartScrollUp",(t=>{e(t.detail)}),t)},onFavoriteRemoved:(e,t)=>{o.addEventListener("unfavorite",(t=>{e(t.detail)}),t)},onNewMessage:(e,t)=>{o.addEventListener("new-message",(t=>{e(t.detail)}),t)},onMessageRead:(e,t)=>{o.addEventListener("message-read",(t=>{e(t.detail)}),t)}}},77407:function(e,t,n){"use strict";n.d(t,{XJ:function(){return r},Yr:function(){return i},ZW:function(){return o}});const o="en-US",r={da:"da-DK",de:"de-DE",en:"en-US",es:"es-ES",fi:"fi-FI",fr:"fr-FR",hu:"hu-HU",it:"it-IT",nl:"nl-NL",nb:"nb-NO",pt:"pt-BR",sv:"sv-SE",ko:"ko-KR",ptPT:"pt-PT",esMX:"es-MX",pl:"pl-PL",ja:"ja-JP"},i=Object.values(r)},95094:function(e,t,n){"use strict";n.d(t,{Q:function(){return a},W:function(){return s}});var o=n(18359),r=n.n(o),i=n(77407);const s=r().createContext({currentLocale:i.ZW,setCurrentLocale:async()=>{}}),a=()=>{const e=r().useContext(s);if(!e)throw new Error("useI18n must be used within an InternationalizationProvider");return e}},93833:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});n(92461),n(39265);var o=n(77407);const r=e=>{const t=o.Yr.find((t=>t===e));if(t)return t;const n=e.split("-")[0],r=Object.entries(o.XJ).find((([e])=>e===n));return r?r[1]:o.ZW}},91892:function(e,t,n){"use strict";t.Z=({tracking:e})=>{var t;const o=e?"https://static-tracking.klaviyo.com/onsite/js/":"https://static.klaviyo.com/onsite/js/",r=null==(t=window.klaviyoModulesObject)?void 0:t.assetSource;n.p=r?`${o}${r}`:o}},52920:function(e,t,n){"use strict";var o=n(91892),r=n(18359),i=n.n(r),s=n(93833),a=n(11369),u=n(555),c=n(43451),l=n(20007);var d=n(82734),C=n(69428);const f=e=>{var t,n,o;const r=null==(t=window.customerHub)?void 0:t.activeProduct;if(!r)return;if(!(0,d.O)("onsite_customer_hub_personalization"))return;const i=null!=(n=null==(o=e.widget)||null==(o=o.addToCartPopoverSettings)?void 0:o.scrollThresholdPercentage)?n:30;let s=0,a=!1,u=!1;window.addEventListener("scroll",(()=>{const e=(()=>{const e=document.documentElement.scrollHeight-window.innerHeight;return e<=0?0:window.scrollY/e*100})();!a&&e>=i&&e>s&&(a=!0,u=!1,c.a.dispatch({type:"addToCartScrollDown",data:{product:r}})),!u&&e{Promise.all([n.e(2462),n.e(5923),n.e(7537),n.e(4928)]).then(n.bind(n,99806)).then((r=>{r.evaluateTriggerDefinition({triggers:{triggers:{ELEMENT_EXISTS:{value:C.XS}}},compoundTriggers:[{triggers:[{triggerType:"ELEMENT_EXISTS",expectedToPass:!0,continuousTrigger:!0}],callback:()=>(async(e,t,o)=>{const[{renderFavoritesButton:r},{renderFavoritesIconButton:i},{renderFaqWidget:s}]=await Promise.all([Promise.all([n.e(2462),n.e(1700),n.e(5923),n.e(6656),n.e(1316),n.e(4661),n.e(9836),n.e(3443),n.e(9880)]).then(n.bind(n,67860)),Promise.all([n.e(2462),n.e(1700),n.e(5923),n.e(6656),n.e(1316),n.e(4661),n.e(9836),n.e(3443),n.e(1627)]).then(n.bind(n,19965)),Promise.all([n.e(2462),n.e(1700),n.e(5923),n.e(6656),n.e(4661),n.e(9836),n.e(4626)]).then(n.bind(n,64383))]);r(e,t),i(e,t),s(e,t,o)})(e,t,o)}]}),f(e)}))};var g=n(16340),p=n(71381);class m extends p.d{addEventListener(e,t,n){super.addEventListener(e,t,n)}}var h=n(69313);n(92461),n(60873);class S{constructor(e){this.settings=void 0,this.settings=e,this.setupCustomerHubApi()}setupCustomerHubApi(){var e=this;if(!window.customerHub)return;const t=window.customerHubApi||{};Object.assign(window,{customerHubApi:Object.assign({},t,{hydrateProduct:async function(t){window.customerHub&&Object.assign(window.customerHub,{activeProduct:null});const n=await e.fetchProduct(t);return n&&window.customerHub&&Object.assign(window.customerHub,{activeProduct:n}),n}})})}async fetchProduct(e){var t,o;const r=null==(t=window.customerHub)?void 0:t.storeDomain,i=null==(o=this.settings.headlessShopifySettings)?void 0:o.storefrontApiPublicKey;if(!r||!i)return null;try{const{HeadlessShopifyClient:t}=await Promise.all([n.e(2462),n.e(4661)]).then(n.bind(n,45819)),o=new t(r,i),s=`/products/${e}`,a=await o.getHydrateProduct(s);if(!a.product)return null;return{name:a.product.name||"",id:a.product.id||e,imageUrl:a.product.imageUrl||"",link:a.product.link||`/products/${e}`,variants:a.product.variants.map((t=>{var n;return{id:t.id||e,title:t.title||"",price:String(t.price||""),imageUrl:t.imageUrl||null,availableForSale:null==(n=t.availableForSale)||n,currency:t.currency||"USD"}}))}}catch(e){return null}}}var b=async()=>{var e,t,o;if(null==(e=window.klaviyoModulesObject)||!e.companyId)return;const{CustomerHubRoot:r,getSettings:d,getLocalizedValues:f}=await Promise.all([n.e(2462),n.e(1700),n.e(5923),n.e(6656),n.e(1316),n.e(7496),n.e(4661),n.e(9836),n.e(3443),n.e(7473)]).then(n.bind(n,61080));let p=null==(t=window.Shopify)?void 0:t.locale;var b;null!=(o=window.Shopify)&&o.country&&p&&(p=`${p}-${null==(b=window.Shopify)?void 0:b.country}`);p=(0,s.B)(p||C.ZW);const[_,T,I]=await Promise.all([d(window.klaviyoModulesObject.companyId),(0,h.ZI)(p),f(window.klaviyoModulesObject.companyId,p)]),O=()=>{const e=window.location.pathname.startsWith("/account/register");_.general.replaceAccountLinks&&!e&&(function(e){var t,n;if((0,l.jO)(e).isChatOnlyExperience)return;const o=null==(t=window.customerHub)?void 0:t.storefrontRoutes.profile;let r='a[href$="/account/login"], a[href$="/account"], a[href^="https://shopify.com/"][href*="/account"], a[href*="/customer_identity/redirect"], a[href*="/customer_authentication/redirect"]';o&&(r=`${r}, a[href$="${o}"]`);const i=document.querySelectorAll(r);for(const e of i)void 0!==e.dataset.kHubIgnore&&"false"!==e.dataset.kHubIgnore||(e.href="#k-hub",e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),window.location.hash="k-hub"})));const s=null==(n=window.customerHub)?void 0:n.storefrontRoutes.logout;let a='a[href$="/account/logout"], a[href$="/customer_identity/logout"]';s&&(a=`${a}, a[href$="${s}"]`);const c=document.querySelectorAll(a);for(const e of c)e.addEventListener("click",(()=>{(0,u.Q7)(void 0)}))}(_),function(){const e=document.querySelectorAll('a[href*="#k-hub');for(const t of e)t.addEventListener("click",(()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"})),c.a.dispatch({type:"open",data:{isOpen:!0}})}))}()),window.customerHubApi={open:e=>{e?c.a.dispatch({type:"navigation",data:{path:e}}):c.a.dispatch({type:"open",data:{isOpen:!0}}),(0,g.w8)(C.OU,C.pv.OPEN,{[C.Ny.ROUTE]:e})},close:()=>{c.a.dispatch({type:"open",data:{isOpen:!1}}),(0,g.w8)(C.OU,C.pv.CLOSE,{})},events:new m},_.general.storeType===a.$.SHOPIFY_HEADLESS&&((e=>{var t,n,o,r;const i={storefrontRoutes:{login:(null==(t=e.headlessShopifySettings)?void 0:t.loginRoute)||"",register:"",logout:(null==(n=e.headlessShopifySettings)?void 0:n.logoutRoute)||"",profile:(null==(o=e.headlessShopifySettings)?void 0:o.profileRoute)||"",addresses:(null==(r=e.headlessShopifySettings)?void 0:r.addressesRoute)||""},userId:null,storeDomain:e.storeUrlDomain?`${e.storeUrlDomain}.myshopify.com`:void 0,activeProduct:void 0};Object.assign(window,{customerHub:i})})(_),(e=>{new S(e)})(_));const t=document.createElement("div");t.id="k-hub",t.style.position="fixed",t.style.top="0px",i().render(i().createElement(i().StrictMode,null,i().createElement(r,{settings:_,i18nInstance:T,localizedValues:null!=I?I:void 0,locale:p})),t),document.body.appendChild(t)};if("complete"===document.readyState)O(),E(_,p,null!=I?I:void 0);else{const e=new AbortController;document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&(O(),E(_,p,null!=I?I:void 0),e.abort())}),{signal:e.signal})}};(0,o.Z)({tracking:!1}),b()},11369:function(e,t,n){"use strict";n.d(t,{$:function(){return o}});const o={SHOPIFY:"shopify",SHOPIFY_HEADLESS:"shopify_headless",WOOCOMMERCE:"woocommerce",CUSTOM:"custom"}},28367:function(e,t,n){var o={"./onsite-atlas/en-US/translations.json":[34276,2780]};function r(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],r=t[0];return n.e(t[1]).then((function(){return n.t(r,19)}))}r.keys=function(){return Object.keys(o)},r.id=28367,e.exports=r},59229:function(e,t,n){var o={"./onsite-atlas/en-US/translations.json":[34276,2780]};function r(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],r=t[0];return n.e(t[1]).then((function(){return n.t(r,19)}))}r.keys=function(){return Object.keys(o)},r.id=59229,e.exports=r}},function(e){e.O(0,[2462,4606,9951],(function(){return t=52920,e(e.s=t);var t}));e.O()}]);